<?php

class i18nTwigExt extends Twig_Extension
{
    private $i18n   = NULL;
    
    public function __construct()
    {
        $this->i18n = Zend_Registry::get('i18n');
    }
    
    public function  getName()
    {
        return 'i18nTwigExt';
    }
    
    public function dict($key, array $params = array())
    {
        return $this->i18n->get($key, $params);
    }
}

# eof